#ifndef __tool_h__
#define __tool_h__

#include "sqlite3-binding.h"
//#include "sqlite3ext.h"

typedef struct sdb_rows{
    int col;
    int row;
    char** result; //Id,1,Name,xyz
} sdb_rows;

void free_sdb_rows(sdb_rows* rows);

typedef struct sdb{
    sqlite3* db;
} sdb;

int sdb_init(const char* path, sdb* sptr);

int sdb_close(sdb* ptr);

int sdb_exec(sdb* sptr, const char* sql);

sdb_rows* sdb_query(sdb* sptr, const char* sql);

#endif